package com.atguigu.dga.governance.assessor.spec;

import com.atguigu.dga.governance.assessor.Assessor;
import com.atguigu.dga.governance.bean.AssessParam;
import com.atguigu.dga.governance.bean.GovernanceAssessDetail;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * ClassName: TableCommentAssessor
 * Package: com.atguigu.dga.governance.assessor.spec
 * Description:
 *
 * @Author:
 * @Create: 2024/3/17 12:04
 * @Version: 1.0
 */
@Component("TABLE_COMMENT")
public class TableCommentAssessor extends Assessor {
    @Override
    public void checkProblem(AssessParam assessParam, GovernanceAssessDetail governanceAssessDetail) {
        // 判空
        String tableComment = assessParam.getTableMetaInfo().getTableComment();
        if(tableComment == null || tableComment.trim().isEmpty()) {
            governanceAssessDetail.setAssessScore(BigDecimal.ZERO);
            governanceAssessDetail.setAssessProblem("表没有备注");
        }


    }
    //    @Override
//    public void doAssess() {
//        System.out.println("comment");
//    }
}
